﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:sys="clr-namespace:System;assembly=mscorlib"
					xmlns:AVUIExtension="clr-namespace:AVUIExtension;assembly=TransitioningWindow">

  <Style x:Key="{x:Type Window}" TargetType="{x:Type Window}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Window}">
          <Border Background="{TemplateBinding Background}">
            <ContentPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type NavigationWindow}" TargetType="{x:Type NavigationWindow}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type NavigationWindow}">
          <Border Background="{TemplateBinding Background}">
            <ContentPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  <Style x:Key="{x:Type Page}" TargetType="{x:Type Page}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Page}">
          <Border Background="{TemplateBinding Background}">
            <ContentPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>


  <Style x:Key="{x:Type ToolTip}" TargetType="{x:Type ToolTip}">
  	<Setter Property="FontSize" Value="20" />
  	<Setter Property="FontFamily" Value="Swiss911 XCm BT" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToolTip}">
          <Border x:Name="Border"
            Background="#FFFF9C00"
			CornerRadius="5"
            Width="{TemplateBinding Width}"
            Height="{TemplateBinding Height}">
            <ContentPresenter
              Margin="4" 
              HorizontalAlignment="Left"
              VerticalAlignment="Top" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>


  <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition Width="20" />
      </Grid.ColumnDefinitions>

      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      
      <Border
        x:Name="Border" 
        Grid.ColumnSpan="2"
        CornerRadius="2"
        Background="Orange"
        BorderThickness="1" />
      <Border 
        Grid.Column="0"
        CornerRadius="2,0,0,2" 
        Margin="1" 
        Background="Purple"
        BorderThickness="0,0,1,0" />
      <Path 
        x:Name="Arrow"
        Grid.Column="1"     
        Fill="#FF000000"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Data="M 0 0 L 4 4 L 8 0 Z"/>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="ToggleButton.IsMouseOver" Value="true">
        <Setter TargetName="Border" Property="Background" Value="Pink" />
      </Trigger>
      <Trigger Property="ToggleButton.IsChecked" Value="true">
        <Setter TargetName="Border" Property="Background" Value="Black" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

  <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
    <Border x:Name="PART_ContentHost" Background="{TemplateBinding Background}" />
  </ControlTemplate>

  <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
    <Setter Property="Template">
      <Setter.Value>
         <ControlTemplate TargetType="{x:Type ComboBox}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="auto" />
              </Grid.ColumnDefinitions>
        
              <Grid.RowDefinitions>
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
            
              <ToggleButton 
                x:Name="ToggleButton" 
                Template="{StaticResource ComboBoxToggleButton}" 
                Grid.Column="1" 
                Focusable="false"
                IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                ClickMode="Press">
              </ToggleButton>
              <ContentPresenter
                x:Name="ContentSite"
                IsHitTestVisible="False" 
                Content="{TemplateBinding SelectionBoxItem}"
                ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                Margin="3,3,23,3"
                VerticalAlignment="Center"
                HorizontalAlignment="Left" />
              <TextBox x:Name="PART_EditableTextBox"
                Template="{StaticResource ComboBoxTextBox}" 
                HorizontalAlignment="Left" 
                VerticalAlignment="Center" 
                Margin="3,3,23,3"
                Focusable="True" 
                Background="Transparent"
                Visibility="Hidden"
                IsReadOnly="{TemplateBinding IsReadOnly}"/>
              <Popup 
                x:Name="Popup"
                Placement="Bottom"
                IsOpen="{TemplateBinding IsDropDownOpen}"
                AllowsTransparency="True" 
                Focusable="False"
                PopupAnimation="Slide">
                <Grid 
                  x:Name="DropDown"
                  SnapsToDevicePixels="True"                
                  MinWidth="{TemplateBinding ActualWidth}"
                  MaxHeight="{TemplateBinding MaxDropDownHeight}">
                  <Border 
                    x:Name="DropDownBorder"
                    Background="Cyan"
                    BorderThickness="1"
                    BorderBrush="Magenta"/>
                  <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" VerticalScrollBarVisibility="Auto">
                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                  </ScrollViewer>
                </Grid>
              </Popup>
              
            </Grid>
<!--            
            <ControlTemplate.Triggers>
              <Trigger Property="HasItems" Value="false">
                <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
              </Trigger>
              <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
              </Trigger>
              <Trigger Property="IsGrouping" Value="true">
                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
              </Trigger>
              <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
                <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="4"/>
                <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
              </Trigger>
              <Trigger Property="IsEditable"
                   Value="true">
                <Setter Property="IsTabStop" Value="false"/>
                <Setter TargetName="PART_EditableTextBox" Property="Visibility"    Value="Visible"/>
                <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
              </Trigger>
            </ControlTemplate.Triggers>      
-->            
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBoxItem}">
          <Border x:Name="Background" Background="Transparent">
            <ContentPresenter HorizontalAlignment="Left" />
          </Border>         
          
          <ControlTemplate.Triggers>

            <Trigger Property="IsFocused" Value="true">
              <Trigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Blue" Duration="00:00:00.3" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Transparent" Duration="00:00:00.3" FillBehavior="Stop" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>                    
            </Trigger>

            <Trigger Property="IsMouseOver" Value="true">
              <Trigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Orange" Duration="00:00:00.3" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Transparent" Duration="00:00:00.3" FillBehavior="Stop" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>                    
            </Trigger>
            
          </ControlTemplate.Triggers>

        </ControlTemplate>
      </Setter.Value>
    </Setter>   
  </Style>


    
	<LinearGradientBrush x:Key="GlassHighlight" EndPoint="0.5,1" StartPoint="0.5,0" SpreadMethod="Pad">
		<GradientStop Color="#00FFFFFF" Offset="0"/>
		<GradientStop Color="#88FFFFFF" Offset="0.11"/>
		<GradientStop Color="#002D4FD1" Offset="0.99"/>
	</LinearGradientBrush>
  
  <LinearGradientBrush x:Key="GlassLowlight" EndPoint="0.5,1.0" StartPoint="0.5,0.0">
  	<GradientStop Color="#00000000" Offset="0"/>
  	<GradientStop Color="#88000000" Offset="0.7"/>
  	<GradientStop Color="#33000000" Offset="1.0"/>
  </LinearGradientBrush>
  
  
  <ControlTemplate x:Key="CommonButtonTemplate" TargetType="{x:Type Button}">
    <Grid>
      <Rectangle RadiusX="3.0" RadiusY="3.0" Stretch="Fill" x:Name="Rectangle1">
        <Rectangle.Style>
          <Style TargetType="{x:Type Shape}">
            <Setter Property="Fill" Value="#FFFF9C00" />
          </Style>
        </Rectangle.Style>
      </Rectangle>
    
      <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4, 1, 4, 1" />
      
      <Rectangle RadiusX="3.0" RadiusY="3.0" x:Name="RectangleHighlight" Fill="{DynamicResource GlassHighlight}" />
    
  
      <Rectangle RadiusX="3.0" RadiusY="3.0" x:Name="RectangleLowLight" Fill="{StaticResource GlassLowlight}">
        <Rectangle.Style>
          <Style TargetType="{x:Type Rectangle}">
            <Setter Property="Visibility" Value="Hidden" />
          </Style>
        </Rectangle.Style>
      </Rectangle>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsPressed" Value="true">
        <Setter TargetName="RectangleHighlight" Property="Visibility" Value="Hidden" />
        <Setter TargetName="RectangleLowLight" Property="Visibility" Value="Visible" />
      </Trigger>
      <Trigger Property="IsEnabled" Value="false">
        <Setter TargetName="RectangleHighlight" Property="Visibility" Value="Hidden" />
        <Setter TargetName="RectangleLowLight" Property="Visibility" Value="Hidden" />
        <Setter TargetName="Rectangle1" Property="Fill" Value="#FF774400" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
    
  <Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
    <Setter Property="Template" Value="{StaticResource CommonButtonTemplate}" />
    <Style.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
		<Trigger.EnterActions>
			<SoundPlayerAction Source="Rollover.wav" />
		</Trigger.EnterActions>		
      </Trigger>
	  <EventTrigger RoutedEvent="Button.Click">
		<SoundPlayerAction Source="Click.wav" />
	  </EventTrigger>
    </Style.Triggers>
  </Style>
  
  
  <Style x:Key="{x:Type ToggleButton}" TargetType="{x:Type ToggleButton}">
    <Setter Property="Template" Value="{StaticResource CommonButtonTemplate}" />
    <Style.Triggers>
      <Trigger Property="IsChecked" Value="true">
        <Setter Property="Foreground" Value="White" />
      </Trigger>
    </Style.Triggers>
  </Style>
  
  
  <Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}">
    <Setter Property="Template" Value="{StaticResource CommonButtonTemplate}" />
    <Style.Triggers>
      <Trigger Property="IsChecked" Value="true">
        <Setter Property="Foreground" Value="White" />
      </Trigger>
    </Style.Triggers>
  </Style>
    
  <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid>
            <Rectangle Fill="#FFFF9C00" RadiusX="5.0" RadiusY="5.0" />
            <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled" Margin="4, 0, 4, 1" x:Name="PART_ContentHost" />
          	<Rectangle RadiusX="5.0" RadiusY="5.0" Fill="{StaticResource GlassHighlight}" IsHitTestVisible="False" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  	<Setter Property="Cursor" Value="IBeam"/>
	<Style.Triggers>	
      <EventTrigger RoutedEvent="TextChanged">
		<SoundPlayerAction Source="Typing.wav" />
      </EventTrigger>
    </Style.Triggers>
	
  </Style>
  
  <Style x:Key="{x:Type AVUIExtension:TransitioningPage}" TargetType="{x:Type AVUIExtension:TransitioningPage}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type AVUIExtension:TransitioningPage}">
          <Border Background="{TemplateBinding Background}">        
            <ContentPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type AVUIExtension:NavButton}" TargetType="{x:Type AVUIExtension:NavButton}">
    <Setter Property="Template" Value="{StaticResource CommonButtonTemplate}" />
    <Style.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
		<Trigger.EnterActions>
			<SoundPlayerAction Source="Rollover.wav" />
		</Trigger.EnterActions>		
      </Trigger>	  
      <EventTrigger RoutedEvent="Button.Click">
	    <SoundPlayerAction Source="Click.wav" />
      </EventTrigger>	  
    </Style.Triggers>	
  </Style>

  
  
  <Style x:Key="ThumbSlider" TargetType="{x:Type Thumb}">
    <Setter Property="Focusable" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Rectangle MinWidth="10" MinHeight="10" x:Name="ThumbRect" RadiusX="3.0" RadiusY="3.0" Margin="2 0 2 0" Stroke="#FF333333" StrokeThickness="2" Fill="Orange" Stretch="Fill" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  <Style x:Key="ThumbScrollBar" TargetType="{x:Type Thumb}">
    <Setter Property="Focusable" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Rectangle x:Name="ThumbRect" RadiusX="3.0" RadiusY="3.0" Margin="2 0 2 0" Stroke="#FF333333" StrokeThickness="2" Fill="Orange" Stretch="Fill" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  
  <Style x:Key="IncButtonScrollBar" TargetType="{x:Type RepeatButton}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Rectangle Fill="Transparent" Stretch="Fill" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  
  <Style x:Key="DecButtonScrollBar" TargetType="{x:Type RepeatButton}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Rectangle Fill="Transparent" Stretch="Fill" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  
  <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
    <Setter Property="Focusable" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollBar}">
          <Grid>
            <Rectangle Fill="Black" Stretch="Fill" RadiusX="0" RadiusY="0" StrokeThickness="2" Stroke="#AAFF9900" />
            <Track x:Name="PART_Track"  Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" Value="{TemplateBinding Value}" ViewportSize="{TemplateBinding ViewportSize}"
                   Orientation="{TemplateBinding Orientation}" IsDirectionReversed="true">
              <Track.Thumb>
                <Thumb Style="{StaticResource ThumbScrollBar}" />
              </Track.Thumb>
              <Track.DecreaseRepeatButton>
                <RepeatButton Style="{StaticResource DecButtonScrollBar}" />
              </Track.DecreaseRepeatButton>
              <Track.IncreaseRepeatButton>
                <RepeatButton Style="{StaticResource IncButtonScrollBar}" />
              </Track.IncreaseRepeatButton>
            </Track>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type ScrollBar}">
              <Grid>
                <Rectangle Fill="Black" Stretch="Fill" RadiusX="0" RadiusY="0" StrokeThickness="2" Stroke="#AAFF9900" />
                <Track x:Name="PART_Track"
                       Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" Value="{TemplateBinding Value}" ViewportSize="{TemplateBinding ViewportSize}"
                       Orientation="{TemplateBinding Orientation}">
                  <Track.Thumb>
                    <Thumb Style="{StaticResource ThumbScrollBar}" />
                  </Track.Thumb>
                  <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource DecButtonScrollBar}" />
                  </Track.DecreaseRepeatButton>
                  <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource IncButtonScrollBar}" />
                  </Track.IncreaseRepeatButton>
                </Track>
              </Grid>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>
  
  <Style x:Key="{x:Type Slider}" TargetType="{x:Type Slider}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Slider}">
          <Grid>
            <Rectangle Fill="Black" Stretch="Fill" RadiusX="0" RadiusY="0" StrokeThickness="2" Stroke="#AAFF9900" />
            <Track x:Name="PART_Track"
                   Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" Value="{TemplateBinding Value}"
                   Orientation="{TemplateBinding Orientation}">
              <Track.Thumb>
                <Thumb Style="{StaticResource ThumbSlider}" />
              </Track.Thumb>
              <Track.DecreaseRepeatButton>
                <RepeatButton Style="{StaticResource DecButtonScrollBar}" />
              </Track.DecreaseRepeatButton>
              <Track.IncreaseRepeatButton>
                <RepeatButton Style="{StaticResource IncButtonScrollBar}" />
              </Track.IncreaseRepeatButton>
            </Track>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type Slider}">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*" />
                  <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
          
  
                <Rectangle Height="2" Stretch="Fill" RadiusX="0" RadiusY="0" Fill="#FFFF9900" />
                <Track x:Name="PART_Track" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" Value="{TemplateBinding Value}"
                       Orientation="{TemplateBinding Orientation}">
                  <Track.Thumb>
                    <Thumb Style="{StaticResource ThumbSlider}" />
                  </Track.Thumb>
                  <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource DecButtonScrollBar}" />
                  </Track.DecreaseRepeatButton>
                  <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource IncButtonScrollBar}" />
                  </Track.IncreaseRepeatButton>
                </Track>
              </Grid>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>
  
  
  <LinearGradientBrush x:Key="ProgressBarBrush" StartPoint="0.5, 0.0" EndPoint="0.5, 1.0">
  	<GradientStop Color="#FF444444" Offset="0.45" />
  	<GradientStop Color="Black" Offset="0.45" />
  </LinearGradientBrush>
  
  
  
  <Style x:Key="{x:Type ProgressBar}" TargetType="{x:Type ProgressBar}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ProgressBar}">
          <Grid x:Name="PART_Track">
            <Rectangle HorizontalAlignment="Left" x:Name="PART_Indicator" Fill="{StaticResource ProgressBarBrush}" />
            <Rectangle Stretch="Fill" RadiusX="4" RadiusY="4" StrokeThickness="2" Stroke="Aqua" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type ProgressBar}">
              <Grid>
                <Rectangle Stretch="Fill" RadiusX="4" RadiusY="4" Fill="#FFFF9C00" />
                <Grid x:Name="PART_Track" Margin="2, 1, 2, 1">
                  <Rectangle HorizontalAlignment="Left" x:Name="PART_Indicator" Fill="{StaticResource ProgressBarBrush}" />
                </Grid>
                <Rectangle Stretch="Fill" RadiusX="4" RadiusY="4" StrokeThickness="2" Stroke="#FFFF9C00" />
              </Grid>    
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>
  
  
  
  
  <Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}">
    <Setter Property="KeyboardNavigation.IsTabStop" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*" />
              <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*" />
              <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
      
  
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" ClipToBounds="true" Grid.Row="0" Grid.Column="0" Content="{TemplateBinding Content}" />
            <ScrollBar x:Name="PART_VerticalScrollBar" Orientation="Vertical" Grid.Row="0" Grid.Column="1" Width="20.0"
                       Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" Value="{TemplateBinding VerticalOffset}"
                       ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
  
  
            <ScrollBar x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Height="20.0"
                       Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" Value="{TemplateBinding HorizontalOffset}"
                       ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
        
  
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  
  <Style x:Key="LeftScrollViewer" TargetType="{x:Type ScrollViewer}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="*" />
              <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="auto" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
      
  
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" ClipToBounds="true" Grid.Row="0" Grid.Column="1" Content="{TemplateBinding Content}" />
            <ScrollBar x:Name="PART_VerticalScrollBar" Orientation="Vertical" Grid.Row="0" Grid.Column="0" Width="20.0"
                       Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" Value="{TemplateBinding VerticalOffset}"
                       ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
  
  
            <ScrollBar x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="1" Grid.Column="1" Height="20.0"
                       Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" Value="{TemplateBinding HorizontalOffset}"
                       ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
        
  
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  
  
  <Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBox}">
          <Border Background="#33FF0000">
            <ScrollViewer Focusable="false" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible">
              <StackPanel Orientation="Vertical" IsItemsHost="true" />
            </ScrollViewer>          
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    

  </Style>
    
  <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBoxItem}">
          <Border x:Name="Background" Background="Transparent">
            <ContentPresenter HorizontalAlignment="Left" />
          </Border>
          
          <ControlTemplate.Triggers>

            <Trigger Property="IsFocused" Value="true">
              <Trigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Blue" Duration="00:00:00.3" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Transparent" Duration="00:00:00.3" FillBehavior="Stop" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>                    
            </Trigger>

            <Trigger Property="IsSelected" Value="true">
              <Trigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Orange" Duration="00:00:00.3" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Background.Color" To="Transparent" Duration="00:00:00.3" FillBehavior="Stop" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>                    
            </Trigger>
            
          </ControlTemplate.Triggers>

        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
    <Setter Property="Width" Value="18"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Border Padding="{TemplateBinding Padding}"
            Background="Transparent">
            <Rectangle HorizontalAlignment="Center"
              Width="1"
              Fill="{TemplateBinding Background}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
         
  <Style x:Key="{x:Type GridViewColumnHeader}" TargetType="{x:Type GridViewColumnHeader}">
    <Setter Property="Template">         
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
          <Grid>
            <Rectangle RadiusX="3.0" RadiusY="3.0" Stretch="Fill" x:Name="Rectangle1">
              <Rectangle.Style>
                <Style TargetType="{x:Type Shape}">
                  <Setter Property="Fill" Value="#FFFF9C00" />
                </Style>
              </Rectangle.Style>
            </Rectangle>
          
            <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4, 1, 4, 1" />
            
            <Rectangle RadiusX="3.0" RadiusY="3.0" x:Name="RectangleHighlight" Fill="{StaticResource GlassHighlight}" />
          
        
            <Rectangle RadiusX="3.0" RadiusY="3.0" x:Name="RectangleLowLight" Fill="{StaticResource GlassLowlight}">
              <Rectangle.Style>
                <Style TargetType="{x:Type Rectangle}">
                  <Setter Property="Visibility" Value="Hidden" />
                </Style>
              </Rectangle.Style>
            </Rectangle>
            
            <Thumb x:Name="PART_HeaderGripper"
              HorizontalAlignment="Right"
              Margin="0,0,-9,0"
              Style="{StaticResource GridViewColumnHeaderGripper}"/>

          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsPressed" Value="true">
              <Setter TargetName="RectangleHighlight" Property="Visibility" Value="Hidden" />
              <Setter TargetName="RectangleLowLight" Property="Visibility" Value="Visible" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>      
      </Setter.Value>
    </Setter>
  </Style>


  <ControlTemplate x:Key="ListViewSVTemplate" TargetType="{x:Type ScrollViewer}">
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="auto" />
          <RowDefinition Height="*" />
          <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="auto" />
        </Grid.ColumnDefinitions>
  
        <ScrollViewer Grid.Row="0" Grid.Column="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
           <GridViewHeaderRowPresenter Columns="{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}"/>
        </ScrollViewer>
  
        <ScrollContentPresenter Grid.Row="1" Grid.Column="0" x:Name="PART_ScrollContentPresenter" ClipToBounds="true" Content="{TemplateBinding Content}" CanContentScroll="{TemplateBinding CanContentScroll}" />
  
        <ScrollBar x:Name="PART_VerticalScrollBar" Orientation="Vertical" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" Width="20.0" 
                   Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" Value="{TemplateBinding VerticalOffset}"
                   ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
  
        <ScrollBar x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="2" Grid.Column="0" Height="20.0" 
                   Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" Value="{TemplateBinding HorizontalOffset}"
                   ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
  
      </Grid>
  </ControlTemplate>

  <Style x:Key="{x:Type ListView}" TargetType="{x:Type ListView}">
    <Setter Property="Foreground" Value="Black" />
    <Setter Property="ItemContainerStyle">
      <Setter.Value>
        <Style TargetType="{x:Type ListViewItem}">
          <Style.Triggers>
            <Trigger Property="IsSelected" Value="true">
              <Trigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetProperty="Foreground.Color" To="Black" Duration="00:00:00.3" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                    <Storyboard>
                      <ColorAnimation Storyboard.TargetProperty="Foreground.Color" To="#FFE4E4E4" Duration="00:00:00.3" FillBehavior="Stop" /> 
                    </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>                              
            </Trigger>
          </Style.Triggers>          
		
          <Setter Property="Foreground" Value="#FFE4E4E4" />         
          <Setter Property="Template">
            <Setter.Value>
              <ControlTemplate TargetType="{x:Type ListViewItem}">
                <Grid>
                  <Rectangle x:Name="RectBackground" Fill="Transparent" />
                  <GridViewRowPresenter x:Name="Presenter" Content="{TemplateBinding Content}" Columns="{TemplateBinding GridView.ColumnCollection}">
                    <GridViewRowPresenter.Style>
                      <Style TargetType="{x:Type GridViewRowPresenter}">
                        <Setter Property="LayoutTransform"> 
                          <Setter.Value>
                            <ScaleTransform ScaleX="1.0" ScaleY="1.0" />
                          </Setter.Value>
                        </Setter>
                      </Style>
                    </GridViewRowPresenter.Style>                    
                  </GridViewRowPresenter>
                </Grid>

                <ControlTemplate.Triggers>
                  <Trigger Property="IsSelected" Value="true">
                    <Trigger.EnterActions>
                      <BeginStoryboard>
                          <Storyboard>
                            <ColorAnimation Storyboard.TargetName="RectBackground" Storyboard.TargetProperty="Fill.Color" To="Orange" Duration="00:00:00.3" /> 
                          </Storyboard>
                      </BeginStoryboard>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                      <BeginStoryboard>
                          <Storyboard>
                            <ColorAnimation Storyboard.TargetName="RectBackground" Storyboard.TargetProperty="Fill.Color" To="Transparent" Duration="00:00:00.05" FillBehavior="Stop" /> 
                          </Storyboard>
                      </BeginStoryboard>
                    </Trigger.ExitActions>                    
                  </Trigger>                  
                </ControlTemplate.Triggers>
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <ScrollViewer Template="{StaticResource ListViewSVTemplate}" CanContentScroll="true" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <VirtualizingStackPanel IsItemsHost="true" />
          </ScrollViewer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type Frame}" TargetType="{x:Type Frame}">
      <Setter Property="Template">
          <Setter.Value>
              <ControlTemplate TargetType="{x:Type Frame}">
                <ContentPresenter />
              </ControlTemplate>
          </Setter.Value>
      </Setter>        
  </Style>

  <Style x:Key="{x:Type TabItem}" TargetType="{x:Type TabItem}">
  
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TabItem}">
          <Grid>
      <Border x:Name="Border" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="4">
               <ContentPresenter x:Name="ContentSite"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            ContentSource="Header"
                            Margin="12,2,12,2" />            
      </Border>
          </Grid>
          
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="true">
              <Setter TargetName="Border" Property="Background" Value="Pink" />
            </Trigger>

            <Trigger Property="IsSelected" Value="false">
              <Setter TargetName="Border" Property="Background" Value="Blue" />
            </Trigger>
          </ControlTemplate.Triggers>

        </ControlTemplate>
      </Setter.Value>
    </Setter>
    
  </Style>	

  <Style x:Key="{x:Type TabControl}" TargetType="{x:Type TabControl}">
  
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TabControl}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <TabPanel Grid.Row="0" Panel.ZIndex="1" Margin="0, 0, 4, -1" IsItemsHost="true" Background="Transparent" />
            <Border Grid.Row="1" BorderBrush="Black" BorderThickness="1">
              <ContentPresenter x:Name="PART_SelectedContentHost"  Margin="4" ContentSource="SelectedContent" />
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

	<Style x:Key="{x:Type GridSplitter}" TargetType="{x:Type GridSplitter}">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type GridSplitter}">
					<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<sys:String x:Key="ThirtyTwo">32</sys:String>	
	<Color x:Key="Black">White</Color>
	
</ResourceDictionary>

